\(\int (3+b \sin (e+f x)) \, dx\) [674]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 16 \[ \int (3+b \sin (e+f x)) \, dx=3 x-\frac {b \cos (e+f x)}{f} \]

[Out]

a*x-b*cos(f*x+e)/f

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2718} \[ \int (3+b \sin (e+f x)) \, dx=a x-\frac {b \cos (e+f x)}{f} \]

[In]

Int[a + b*Sin[e + f*x],x]

[Out]

a*x - (b*Cos[e + f*x])/f

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = a x+b \int \sin (e+f x) \, dx \\ & = a x-\frac {b \cos (e+f x)}{f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.69 \[ \int (3+b \sin (e+f x)) \, dx=3 x-\frac {b \cos (e) \cos (f x)}{f}+\frac {b \sin (e) \sin (f x)}{f} \]

[In]

Integrate[3 + b*Sin[e + f*x],x]

[Out]

3*x - (b*Cos[e]*Cos[f*x])/f + (b*Sin[e]*Sin[f*x])/f

Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06

method result size
default \(a x -\frac {b \cos \left (f x +e \right )}{f}\) \(17\)
risch \(a x -\frac {b \cos \left (f x +e \right )}{f}\) \(17\)
parts \(a x -\frac {b \cos \left (f x +e \right )}{f}\) \(17\)
parallelrisch \(\frac {b \left (-\cos \left (f x +e \right )-1\right )}{f}+a x\) \(20\)
derivativedivides \(\frac {a \left (f x +e \right )-b \cos \left (f x +e \right )}{f}\) \(22\)
norman \(\frac {a x +a x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {2 b \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) \(52\)

[In]

int(a+b*sin(f*x+e),x,method=_RETURNVERBOSE)

[Out]

a*x-b*cos(f*x+e)/f

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.12 \[ \int (3+b \sin (e+f x)) \, dx=\frac {a f x - b \cos \left (f x + e\right )}{f} \]

[In]

integrate(a+b*sin(f*x+e),x, algorithm="fricas")

[Out]

(a*f*x - b*cos(f*x + e))/f

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.19 \[ \int (3+b \sin (e+f x)) \, dx=a x + b \left (\begin {cases} - \frac {\cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \sin {\left (e \right )} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(a+b*sin(f*x+e),x)

[Out]

a*x + b*Piecewise((-cos(e + f*x)/f, Ne(f, 0)), (x*sin(e), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int (3+b \sin (e+f x)) \, dx=a x - \frac {b \cos \left (f x + e\right )}{f} \]

[In]

integrate(a+b*sin(f*x+e),x, algorithm="maxima")

[Out]

a*x - b*cos(f*x + e)/f

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int (3+b \sin (e+f x)) \, dx=a x - \frac {b \cos \left (f x + e\right )}{f} \]

[In]

integrate(a+b*sin(f*x+e),x, algorithm="giac")

[Out]

a*x - b*cos(f*x + e)/f

Mupad [B] (verification not implemented)

Time = 8.17 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.56 \[ \int (3+b \sin (e+f x)) \, dx=a\,x-\frac {2\,b}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \]

[In]

int(a + b*sin(e + f*x),x)

[Out]

a*x - (2*b)/(f*(tan(e/2 + (f*x)/2)^2 + 1))